package com.qianxin;

import java.util.Scanner;

/**
 * @Author xiongmin
 * @Description //TODO
 * @Date 2020/2/28 19:02
 * @Version 1.0
 **/
public class 兔子繁衍 {
    static Scanner cin = new Scanner(System.in);

    public static void main(String[] args) {
        int n = cin.nextInt();
        if (n < 5) {
            System.out.println(1);
        } else {
            long[] arr = new long[n+1];
            for (int i = 1; i < 5; i++) {
                arr[i] = 1;
            }
            for (int i = 5; i <= n; i++) {
                arr[i] = arr[i-4] + arr[i-1];
            }
            System.out.println(arr[n]);
        }
    }
}
